import { mscf, messageInstance } from '@/util'
import breadNav from '@/components/breadNav'
import filterContainer from '@/components/filterContainer'
import filterItem from '@/components/filterItemContainer'
import mainBody from '@/components/mainBody'
import pagination from '@/components/pagination'
const isDebug = process.env.NODE_ENV !== 'production'
export default {
  install(Vue, options) {
    Vue.prototype.$mscf = mscf
    Vue.prototype.$message = function() {
      isDebug && console.error('请使用this.$messageSend方法。use `this.$messageSend` instead')
    }
    Vue.prototype.$message.error = function() {
      isDebug && console.error('请使用this.$messageSend.error方法。use `this.$messageSend.error` instead')
    }
    Vue.prototype.$message.success = function() {
      isDebug && console.error('请使用this.$messageSend.success方法。use `this.$messageSend.success` instead')
    }
    Vue.prototype.$message.warning = function() {
      isDebug && console.error('请使用this.$messageSend.warning方法。use `this.$messageSend.warning` instead')
    }
    Vue.prototype.$messageSend = messageInstance
    Vue.component('breadNav', breadNav)
    Vue.component('filterContainer', filterContainer)
    Vue.component('filterItem', filterItem)
    Vue.component('mainBody', mainBody)
    Vue.component('pagination', pagination)
  }
}
